package com.yang.leather.admin.dao.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Service;

import com.yang.leather.admin.dao.IProdDao;
import com.yang.leather.admin.pojo.Product;
import com.yang.leather.common.page.Pagination;
import com.yang.leather.core.LeatherCoreDaoImpl;

@Service("prodDao")
public class ProdDaoImpl extends LeatherCoreDaoImpl<Product> implements IProdDao{

	public Pagination getProductListPage(Map<String, Object> params, int pageNo, int pageSize) {
		
		String hql = "from Product bean where 1=1 ";
		
		return super.pagination(hql, params, pageNo, pageSize, true);
	}

	public int countProductList(Map<String, Object> params) {
		String hql = "from Product";
		return super.count(hql, params, true);
	}

	public List<Product> getLimitProdList(Map<String, Object> params, int limit){
		String hql = "from Product";
		
		return super.getLimitList(hql, params, limit, true);
	}
}
